﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;

namespace LASLogic.BusinessLayer.DataModel
{
    /// <summary>
    /// Clase que maneja la funcionalidad de las relaciones entre asientos y cuentas
    /// </summary>
    [DataContract]
    public class EntryHasAccount
    {
        /// <summary>
        /// Id único de la cuenta
        /// </summary>
        [DataMember]
        public int AccountId { get; set; }
        [DataMember]
        public Decimal LocalBalance { get; set; }
        /// <summary>
        /// Balance del sistema de la cuenta
        /// </summary>
        [DataMember]
        public Decimal SystemBalance { get; set; }
        /// <summary>
        /// Balance extranjero de la cuenta
        /// </summary>
        [DataMember]
        public Decimal ForeignBalance { get; set; }
        /// <summary>
        /// Tipo de cambio de la cuenta
        /// </summary>
        [DataMember]
        public Decimal ExchangeRate { get; set; }
        /// <summary>
        /// Tipo de transaccion
        /// </summary>
        [DataMember]
        public string TransactionType { get; set; }

        /// <summary>
        /// Constructor del Struct
        /// </summary>
        /// <param name="accountId">Identificador de cuenta</param>
        /// <param name="localBalance">Monto en moneda local</param>
        /// <param name="systemBalance">Monto en moneda Sistema</param>
        /// <param name="foreignBalance">Monto en moneda Extranjera</param>
        /// <param name="exchangeRate">Tipo de cambio moneda extranjera</param>
        /// <param name="transactionType">Tipo de transaccion o debe o haber</param>
        public EntryHasAccount(int accountId, Decimal localBalance, Decimal systemBalance, Decimal foreignBalance, Decimal exchangeRate, string transactionType)
        {
            AccountId = accountId;
            LocalBalance = localBalance;
            SystemBalance = systemBalance;
            ForeignBalance = foreignBalance;
            ExchangeRate = exchangeRate;
            TransactionType = transactionType;
        }

        /// <summary>
        /// Constructor vacio
        /// </summary>
        public EntryHasAccount()
        {
        }
    }
}
